<script type="text/javascript" src="modules/{$module}/js/edit.js"></script>
<form id="formUsers" action="?action=save&id={$smarty.get.id}" method="post">
    <p>
        <label>Nombre</label>
        <input name="first_name" value="{$mfuser->first_name}">
    </p>
    <p>
        <label>Apellidos</label>
        <input name="last_name" value="{$mfuser->last_name}" >
    </p>
    <p>
        <label>Email</label>
        <input name="email" value="{$mfuser->email}" onchange="sendByAjax('usuarios','checkEmail','email',this.value,'confirmEmail')">
        <label class="error" id="confirmEmail"></label>
    </p>
    {if isset($smarty.get.id)}
    <p>
        <label>Cambair Contraseña</label><input type="checkbox" onchange="activePassword(this.checked);">
    </p>
    <div id="editPassword" style="display:none;">
        <p>
            <label>Contraseña</label>
            <input name="password" type="password" id="password" autocomplete="off" disabled="disabled">
        </p>
        <p>
            <label>Confirmar Contraseña</label>
            <input name="confirm_password" type="password" id="confirm_password" autocomplete="off" disabled="disabled">
        </p>
    </div>
    {else}
    <p>
        <label>Contraseña</label>
        <input name="password" type="password" id="password" class="required" autocomplete="off">
    </p>
    <p>
        <label>Confirmar Contraseña</label>
        <input name="confirm_password" type="password" class="required" id="confirm_password" autocomplete="off">
    </p>
    {/if}
    <p>
        <label>Dirección</label>
        <input name="address" value="{$mfuser->address}">
    </p>
    <p>
        <label>Telefono</label>
        <input name="telephone" value="{$mfuser->telephone}">
    </p>
    <p>
        <label>Website</label>
        <input name="website" value="{$mfuser->website}" class="url">
    </p>
    <p>
        <label>Fecha de ingreso</label>
        <input name="registration_date" class="data" value="{$mfuser->registration_date}">
    </p>
    <p>
        <label>Acceso al CMS</label>
        <input type="checkbox" name="cms_access" value="1" {if $mfuser->cms_access}checked="checked"{/if}>
    </p>
    <p>
        <label>Usuario Activo</label>
        <input type="checkbox" name="active" value="1" {if $mfuser->active}checked="checked"{/if}>
    </p>
    <p>
        <label>Token</label><input type="button" class="button" value="Generar Token" onclick="generateToken();">
        <input readonly="readonly" name="token" value="{$mfuser->token}" id="token">
    </p>
    <p>
        <input type="submit" class="button" value="Guardar">
        <input type="reset" class="button" value="Reset">
    </p>
</form>